#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START disttar
# depends: rootfs
# depends: initramfs

set -o pipefail

DIST_TARBALL="blinux-rootfs-${TARGET%%-*}.tgz"
fakeroot tar -c -f - -C "$r00tfs" . | pigz -9 > "${DIST_TARBALL}.$$"
md5sum "${DIST_TARBALL}.$$" > "${DIST_TARBALL}.md5.$$"

mv -f "${DIST_TARBALL}.$$" "$DIST_TARBALL"
mv -f "${DIST_TARBALL}.md5.$$" "${DIST_TARBALL}.md5"

# RECIPE END disttar
